﻿#ifndef WIDGET_H
#define WIDGET_H

#include <QTimer>
#include <QWidget>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
    void paintEvent(QPaintEvent *event)override;
    void initTable();
    void drawBigCricle(QPainter &painter);
    void drawSmallCricle(QPainter &painter,int radius);
    void drawScale(QPainter &painter, int Radius);
    void drawText(QPainter &painter);
    void drawPointer(QPainter &painter);
    void drawPie(QPainter &painter, int raidus);
    void drawRect(QPainter &painter);
    void drawBlackCricle(QPainter &painter,int radius);
    void drawCurrendSpeed(QPainter &painter);
    void drawInnerShine(QPainter &painter,int radius);
    void drawOutShine(QPainter &painter,int radius);
    void drawLogo(QPainter &painter,int radius);

private:
    Ui::Widget *ui;
    QTimer *timer;
    int Angle;
    int mark;
    //计算出一个刻度需要旋转的角度
    double angle = 240*1.0/60;
};
#endif // WIDGET_H
